using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class PCIBeforeOppRecordMap : EntityTypeConfiguration<PCIBeforeOppRecord>
    {
        public PCIBeforeOppRecordMap()
        {
            // Primary Key
            this.HasKey(t => t.PCIBeforeOppRecaodsId);

            // Properties
            this.Property(t => t.patient_id)
                .HasMaxLength(20);

            this.Property(t => t.create_by)
                .HasMaxLength(20);

            this.Property(t => t.update_by)
                .HasMaxLength(20);

            this.Property(t => t.Lab_Biochemical_Hb)
                .HasMaxLength(20);

            this.Property(t => t.Lab_Biochemical_Cr)
                .HasMaxLength(20);

            this.Property(t => t.Lab_Biochemical_HCT)
                .HasMaxLength(20);

            this.Property(t => t.Lab_Biochemical_CRP)
                .HasMaxLength(20);

            this.Property(t => t.Lab_Biochemical_BG)
                .HasMaxLength(20);

            this.Property(t => t.Lab_Biochemical_BNP)
                .HasMaxLength(20);

            this.Property(t => t.Lab_Biochemical_CTNI)
                .HasMaxLength(20);

            this.Property(t => t.Lab_Biochemical_CK_MMB)
                .HasMaxLength(20);

            this.Property(t => t.LVEF)
                .HasMaxLength(20);

            this.Property(t => t.LVEDD)
                .HasMaxLength(20);

            this.Property(t => t.Ventricular_aneurysm)
                .HasMaxLength(20);

            this.Property(t => t.Ventricular_aneurysm_TF)
                .HasMaxLength(20);

            this.Property(t => t.BeforeOppCTCATime)
                .HasMaxLength(20);

            this.Property(t => t.BeforeOppCTCAYear)
                .HasMaxLength(50);

            this.Property(t => t.BeforeOppCTCAMonth)
                .HasMaxLength(50);

            this.Property(t => t.CTCA_Negative_Masculine)
                .HasMaxLength(20);

            this.Property(t => t.Pericardial_effusion)
                .HasMaxLength(20);

            this.Property(t => t.Effusion_number)
                .HasMaxLength(50);

            this.Property(t => t.Image_Address)
                .HasMaxLength(80);

            this.Property(t => t.TotalHeartRate)
                .HasMaxLength(20);

            this.Property(t => t.POR_Arrhythmia)
                .HasMaxLength(20);

            this.Property(t => t.POR_ArrhythmiaTrue)
                .HasMaxLength(20);

            this.Property(t => t.POR_STChanges)
                .HasMaxLength(20);

            this.Property(t => t.POR_ExerciseTest)
                .HasMaxLength(20);

            this.Property(t => t.LAD)
                .IsFixedLength()
                .HasMaxLength(10);

            this.Property(t => t.LCX)
                .IsFixedLength()
                .HasMaxLength(10);

            this.Property(t => t.RCA)
                .IsFixedLength()
                .HasMaxLength(10);

            this.Property(t => t.DIA)
                .IsFixedLength()
                .HasMaxLength(10);

            this.Property(t => t.PH_CalcificationScore)
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("PCIBeforeOppRecords");
            this.Property(t => t.PCIBeforeOppRecaodsId).HasColumnName("PCIBeforeOppRecaodsId");
            this.Property(t => t.patient_id).HasColumnName("patient_id");
            this.Property(t => t.follow_up_id).HasColumnName("follow_up_id");
            this.Property(t => t.create_time).HasColumnName("create_time");
            this.Property(t => t.create_by).HasColumnName("create_by");
            this.Property(t => t.update_time).HasColumnName("update_time");
            this.Property(t => t.update_by).HasColumnName("update_by");
            this.Property(t => t.Lab_Biochemical_Hb).HasColumnName("Lab_Biochemical_Hb");
            this.Property(t => t.Lab_Biochemical_Cr).HasColumnName("Lab_Biochemical_Cr");
            this.Property(t => t.Lab_Biochemical_HCT).HasColumnName("Lab_Biochemical_HCT");
            this.Property(t => t.Lab_Biochemical_CRP).HasColumnName("Lab_Biochemical_CRP");
            this.Property(t => t.Lab_Biochemical_BG).HasColumnName("Lab_Biochemical_BG");
            this.Property(t => t.Lab_Biochemical_BNP).HasColumnName("Lab_Biochemical_BNP");
            this.Property(t => t.Lab_Biochemical_CTNI).HasColumnName("Lab_Biochemical_CTNI");
            this.Property(t => t.Lab_Biochemical_CK_MMB).HasColumnName("Lab_Biochemical_CK_MMB");
            this.Property(t => t.LVEF).HasColumnName("LVEF");
            this.Property(t => t.LVEDD).HasColumnName("LVEDD");
            this.Property(t => t.Ventricular_aneurysm).HasColumnName("Ventricular_aneurysm");
            this.Property(t => t.Ventricular_aneurysm_TF).HasColumnName("Ventricular_aneurysm_TF");
            this.Property(t => t.BeforeOppCTCATime).HasColumnName("BeforeOppCTCATime");
            this.Property(t => t.BeforeOppCTCAYear).HasColumnName("BeforeOppCTCAYear");
            this.Property(t => t.BeforeOppCTCAMonth).HasColumnName("BeforeOppCTCAMonth");
            this.Property(t => t.CTCA_Negative_Masculine).HasColumnName("CTCA_Negative_Masculine");
            this.Property(t => t.Pericardial_effusion).HasColumnName("Pericardial_effusion");
            this.Property(t => t.Effusion_number).HasColumnName("Effusion_number");
            this.Property(t => t.Image_Address).HasColumnName("Image_Address");
            this.Property(t => t.TotalHeartRate).HasColumnName("TotalHeartRate");
            this.Property(t => t.POR_Arrhythmia).HasColumnName("POR_Arrhythmia");
            this.Property(t => t.POR_ArrhythmiaTrue).HasColumnName("POR_ArrhythmiaTrue");
            this.Property(t => t.POR_STChanges).HasColumnName("POR_STChanges");
            this.Property(t => t.POR_ExerciseTest).HasColumnName("POR_ExerciseTest");
            this.Property(t => t.LAD).HasColumnName("LAD");
            this.Property(t => t.LCX).HasColumnName("LCX");
            this.Property(t => t.RCA).HasColumnName("RCA");
            this.Property(t => t.DIA).HasColumnName("DIA");
            this.Property(t => t.PH_CalcificationScore).HasColumnName("PH_CalcificationScore");
        }
    }
}
